<h1><%= "Manage #{program.name}'s Authors" %></h1>

<% unless users.blank? %>
	<div class="span-18 list_header bold last">
		<div class="span-8 description">User</div>
		<div class="span-4 description">Privilege</div>
	</div>
			
	<% users.each do |user| %>
		<div class="span-18 last">
		
		<div class="span-8 description">
			<%= link_to "#{user.name}", :controller => 'users', :action => 'show', :id => user %>
		</div>
		<div class="span-4 description">
		<% if user.has_role? Role::Author, program %>
			<%= link_to_remote image_tag('user_active_small.png', :size => "17x17", :title => "Click me to disable this privilege."),
				:update => 'authors_management',
				:url => { :controller => 'users', :action => 'disable_author', 
				:user_id => user.id, :program_id => program.id } %>
		<% else %>
			<%= link_to_remote image_tag('user_inactive_small.png', :size => "17x17", :title => "Click me to become an Author."),
				:update => 'authors_management',
				:url => { :controller => 'users', :action => 'enable_author', 
				:user_id => user.id, :program_id => program.id } %>
		<% end %>
		</div>
	</div>
	<% end %>
<% end %>